import pycuda.gpuarray as gpuarray
import pycuda.autoinit
import pycuda.driver
import numpy as np
#计时器
from timeit import default_timer as timer
from pycuda.compiler import SourceModule

# a_gpu = gpuarray.to_gpu(np.random.randn(4,4).astype(np.float32))
# a_doubled = (2*a_gpu).get()
# print(a_doubled)
# print(a_gpu)

for key,value in pycuda.tools.get_default_device().get_attributes().items():
   print("%s : %s" %(key,value))